package com.smz.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smz.dao.TVehicleDriverDAO;
import com.smz.entity.TLogistics;
import com.smz.entity.TVehicleCar;
import com.smz.entity.TVehicleDriver;
import com.smz.service.TVehicleDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TVehicleDriverServiceImpl extends ServiceImpl<TVehicleDriverDAO,TVehicleDriver> implements TVehicleDriverService {
    @Autowired
    private TVehicleDriverDAO tVehicleDriverDao;


    @Override
    public IPage<TVehicleDriver> findTVehicleDriverPage(int current, int size) {
        return tVehicleDriverDao.findTVehicleDriverPage(new Page(current,size));
    }

    @Override
    public IPage<TVehicleDriver> findTVehicleDriverId(int current, int size, int driverId) {
        return tVehicleDriverDao.findTVehicleDriverId(new Page(current,size),driverId);
    }

    @Override
    public IPage<TVehicleDriver> findTVehicleDriverNameNumber(int current, int size, String driverName, String driverLicense) {
        return tVehicleDriverDao.findTVehicleDriverNameNumber(new Page(current,size),driverName,driverLicense);
    }


    @Override
    public List<TLogistics> findTLogistics() {
        return tVehicleDriverDao.findTLogistics();
    }

    @Override
    public List<TVehicleCar> findTVehicleCar() {
        return tVehicleDriverDao.findTVehicleCar();
    }

}
